<template>
  <div id="WINDOWS12">
    <Rmenu />
    <Tabbar />
    <Windows />
    <WinPanel />
    <router-view />
  </div>
</template>
<script>
export default {
  name: "WINDOWS12",
  created() {
    this.init()
  },
  methods: {
    init() {
      this.initIcon()
      this.initClick()
    },
    initIcon() {
      //iconfont 多色图标 使用Icon组件传入name调用
      let iconfont = document.createElement("script")
      iconfont.type = "text/javascript"
      iconfont.src = "//at.alicdn.com/t/font_3124068_irhvg86o0a.js"
      document.getElementsByTagName("head")[0].appendChild(iconfont)
    },
    initClick() {
      //全局点击
      window.onclick = () => this.windowClick()
    },
    windowClick() {
      this.$store.commit('desk/saveRmenu', false ); //关闭右键菜单
      this.$store.commit("desk/saveData", { aim: "acwindow", dt: false }) //窗口失活
    },
  },
}
</script>
